<%@ page import="java.util.List , edu.stthomas.seis752.model.Media" %>
<%
List<Media> mediaList = (List<Media>) request.getAttribute("mediaList");
for(Media media: mediaList){
    String mediaType = media.getMediaType().getCode();
    if(mediaType.equals("PIC")){
        out.println("<img width='320' height='240' src='" + media.getFileLocation()  +  "'/> <br>");
    }
    else if (mediaType.equals("VID")) {
        out.println("<video width='320' height='240' controls='controls'> <source src='" 
        + media.getFileLocation()  
        +  "' type='video/ogg'> Your browser does not support the video tag. </video> <br>");
    }
}
%>
